
cc.Class({
    extends: cc.Component,

    properties:()=>({
        _textCom:{
            default:null,
            type:cc.Label,
        },
        _doubleText:{
            default:null,
            type:cc.Label,
        }
    }),

    start () {

        //cc.error("ui load");
        //cc.log("Onload 测试-UI score");
        this._textCom =this.node.getComponent(cc.Label);
        this._doubleText =this.node.getComponentInChildren(cc.Label);
        //this.GameControl.scoreCtl.RegisterUIScore(this);
    },

    onEnable()
    { this._textCom =this.node.getComponent(cc.Label);
        this._textCom.string ="0";

    },

    //设置分数
    SetScore(score)
    {
        this._textCom.string =score;
    },

    ShowDoubleText(value)
    {
        this._doubleText.node.active =true;
        this._doubleText.string ="X"+value;
    },
    CloseDoubleText(){
        this._doubleText.node.active =false;
    }




});
